from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('myEvents.views',
    url(r'^$', 'index'),
    url(r'^home/$', 'home'),
    url(r'^index/$', 'index'),
    url(r'^createEvent/$', 'createEvent'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/editEvent/$', 'editEvent'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/xhr_test/$', 'xhr_test'),    #testing ajax
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/getPosVote/$', 'getPosVote'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/getNegVote/$', 'getNegVote'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/getMyVotes/$', 'getMyVotes'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/getVoteStats/$', 'getVoteStats'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/getVoteDate/$', 'getVoteDate'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/currentResult/$', 'currentResult'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/setVote/$', 'setVote'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/result/$', 'pollResult'),
    url(r'(?P<ehash>\w+)/result/$', 'pollResult'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/admin/$', 'admin'),
    url(r'(?P<ehash>\w+)/(?P<uhash>\w+)/attender/$', 'attender'),
)

urlpatterns += staticfiles_urlpatterns()

